<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport"
			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.css" rel="stylesheet" />
		<script src="../js/mui.js"></script>
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
		<script type="text/javascript">
			mui.init()
		</script>
	</head>
	<style>
		.cont {
			padding: 15px 15px;
		}
	</style>
	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">个人详情</h1>
		</header>
		<div class="mui-content">
			<ul class="mui-table-view ch_r" style="margin-top: 0;">
				<!-- <li class="mui-table-view-cell mui-media">
			        <a href="javascript:;" href="html/dzb.html">
			            <img class="mui-media-object mui-pull-left" src="./images/add.png">
			            <div class="mui-media-body">
			                李子申
			                <p class='mui-ellipsis'>上高&nbsp;&nbsp;|&nbsp;&nbsp;普通党员</p>
			                <p class='mui-ellipsis'>个人简介</p>
			            </div>
			        </a>
			    </li> -->
			</ul>
			<div class="cont"></div>
		</div>
	</body>
	<script>
		const urlParams = new URLSearchParams(window.location.search);
		const id = urlParams.get("id"); // 获取当前页面id值
		
		mui.ajax('http://192.168.0.111:3000/branchs/bran', {
			dataType: 'json', //服务器返回json格式数据
			type: 'get', //HTTP请求类型	              
			success: function(res) {
				let data = res.data
				data.forEach(item => {
					if (id == item.id) {
						let module = `
				<li class="mui-table-view-cell mui-media">
				    <a href="html/dzb.html?id=${item.id}">
				        <img class="mui-media-object mui-pull-left" style="max-width:100px; width:100px; height:120px;" src="${item.img}">
				        <div class="mui-media-body">
				            ${item.name}
				            <p class='mui-ellipsis'>${item.area}&nbsp;&nbsp;|&nbsp;&nbsp;${item.Political}</p>
				        </div>
				    </a>
				</li>
			`
						$('.ch_r').append(module)
					let module1 = `
					<span>${item.h2}</span>
					<p>${item.Personal}</p>
					`
					$('.cont').append(module1)
					}
				})
			},
			error: function(xhr, type, errorThrown) {
				//异常处理；
				console.log(type);
			}
		});
	</script>
</html>